﻿using BIS.Utility.DAL.DataMapper;
using BIS.Utility.Converter;

namespace BIS.Portal.Modules.CMS.Entity
{
    public class ClientCmsArticleCategoryAndCategoryEntity : IEntity
    {

        #region Private member

        private int _category_id;
        private string _category_name;
        #endregion

        #region Pulbic contructor

        public ClientCmsArticleCategoryAndCategoryEntity()
        {
        }

        public ClientCmsArticleCategoryAndCategoryEntity(int id)
        {
            this._category_id = id;
        }

        public ClientCmsArticleCategoryAndCategoryEntity(int iCategory_id, string sCategory_name)
        {
            this._category_id = iCategory_id;
            this._category_name = sCategory_name;
        }


        #endregion

        #region Pulbic properties

        public virtual int Category_id
        {
            get
            {
                return _category_id;
            }
            set
            {
                _category_id = value;
            }
        }

        public virtual string Category_name
        {
            get
            {
                return _category_name;
            }
            set
            {
                _category_name = value;
            }
        }

        #endregion

        #region Implement From IEntity Member

        public void Fill(System.Data.IDataReader reader)
        {
            Category_id = Functions.GetInt(reader["category_id"]);
            Category_name = Functions.GetString(reader["category_name"]);
        }
        #endregion

    }
}
